// 该文件见存放演员模块相关的接口api
import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl";
const {BMDURL} =BASEURL

const actorsApi={
    /**
     * 新增演员
     */
    add(params){
       return myaxios.post(BMDURL+'/movie-actor/add',params)
    },
    /**
     * 通过姓名模糊查询演员列表
     */
    queryByNameLike(params){
        return myaxios.post(BMDURL+'/movie-actors/name',params)
    },
    /**
     * 删除演员
     * @param {object} params {id:演员id}
     */
    delete(params){
        return myaxios.post(BMDURL+'/movie-actor/del',params)
    },
    // 查询所以演员
    queryAll() {
        let url = BMDURL+'/movie-actors';
        console.log(url)
        let params = { page: 1, pagesize: 27 };
        return myaxios.get(url, params)
      },
}

export default actorsApi